home *** CD-ROM | disk | FTP | other *** search
- Path: ra.nrl.navy.mil!usenet
- From: dyer@alx.sticomet.com (Doug Dyer)
- Newsgroups: comp.sys.amiga.programmer
- Subject: MatchFirst->Lock->Examine->ExAll = Enforcer (Help! :)
- Date: 29 Jan 1996 19:12:08 GMT
- Organization: Naval Research Laboratory
- Message-ID: <4ej668$f7u@ra.nrl.navy.mil>
- NNTP-Posting-Host: tgdp00.nrl.navy.mil
- X-Newsreader: NN version 6.5.0 CURRENT #10
-
- Hi folks,
-
- I am trying to write a program that will, given an amigados
- pattern, recursively descend directories and perform some
- action on each file.
-
- Im having a problem with an enforcer hit in ExAll() and Im
- not sure why, so I thought Id post here with a synopsis
- of the algorithm in case Im doing something "amiga-illegal".
-
- Any example code anyone can supply would be great! (or insights!)
- thanks,
- Doug
-
- ... main .......
- main()
- if (MatchFirst()) {
- do {
- handlePath(pathname)
- } while (MatchNext())
-
- .... handlePath ...
-
- handlePath(pathname)
- lock (path, ACCESS_WRITE)
-
- Examine (path)
- if (path is a directory)
- EnterDirectory(lock, pathname);
- else (do specific file thingie)
-
- unlock(path)
-
- .... enterDirectory ....
-
-
- get the dos object,
- use allocmem for alignment
- ExAll
- for each ExAllEntry, handlePath
-
- --
- Doug Dyer - dyer@alx.sticomet.com | ECL: embedded command language
- STI: voice (703) 329-9707 | for the 8051 family
- These opinions are yours
-